package cn.com.zcode.test;

import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionStatus;

public class TxManager {
	TransactionStatus status;
	DataSourceTransactionManager txManager;
	public TxManager( DataSourceTransactionManager txManager,TransactionStatus status) {
		super();
		this.status = status;
		this.txManager = txManager;
	}
	
	public void commit(){
		txManager.commit(status);
	}
	
	public void rollback(){
		txManager.rollback(status);
	}
}
